package com.xls.box2023.adapter;

import android.content.Context;
import android.view.ViewGroup;

import androidx.annotation.NonNull;

import com.lzz.bottomencapsulation.adapter.MvpBaseRecyclerAdapter;
import com.xls.box2023.entity.JiFenMingXiEntity;

import java.util.ArrayList;
import java.util.List;

public class JiFenMingXiAdapter  extends MvpBaseRecyclerAdapter<JiFenMingXiViewHolder> {

    ArrayList<JiFenMingXiEntity> dataList;
    public JiFenMingXiAdapter(Context context,ArrayList<JiFenMingXiEntity> dataList) {
        super(context);
        this.dataList=dataList;
    }

    @Override
    public void onBindView(@NonNull JiFenMingXiViewHolder holder, int position) {
        holder.setViewData(dataList.get(position));
        holder.initView();
    }

    @Override
    public void onBindView(JiFenMingXiViewHolder holder, int position, List<Object> payloads) {

    }

    @NonNull
    @Override
    public JiFenMingXiViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return new JiFenMingXiViewHolder(context,parent);
    }

    @Override
    public int getItemCount() {
        return dataList.size();
    }
}
